%\newcommand{\txtcorrect}{Rettelse}
%\newcommand{\txtreview}{Gennemgang}
%\newcommand{\txttable}{Tabel.}
%\newcommand{\txtfigure}{Figur.}
%\newcommand{\textsequence}{Sekvensdiagram.}
%\newcommand{\textdiagram}{Klassediagram.}
%\newcommand{\textpackage}{Pakkediagram.}
%\newcommand{\textappendix}{Bilag.}
%\newcommand{\txtsection}{Afsnit.}
%\newcommand{\txtcode}{Kode.}
\newcommand{\txtoriginaltext}{Original Text}
\newcommand{\txtcorrect}{Correct}
\newcommand{\txtreview}{Review}
\newcommand{\txttable}{Table}
\newcommand{\txtfigure}{Figure}
\newcommand{\textsequence}{Sequencediagram}
\newcommand{\textdiagram}{Classdiagram}
\newcommand{\textpackage}{Packagediagram}
\newcommand{\textappendix}{Appendix}
\newcommand{\txtsection}{Section}
%\newcommand{\txtcode}{Code.}
\newcommand{\txtcode}{Listing}

\newcommand{\sectionref}[1]{\txtsection\ \ref{#1}}
\newcommand{\tableref}[1]{\txttable\ \ref{#1}}
\newcommand{\figureref}[1]{\txtfigure\ \ref{#1}}
\newcommand{\sequenceref}[1]{\textsequence\ \ref{#1}}
\newcommand{\diagramref}[1]{\textdiagram\ \ref{#1}}
\newcommand{\packageref}[1]{\textpackage\ \ref{#1}}
\newcommand{\appendixref}[1]{\textappendix\ \ref{#1}}
%\newcommand{\coderef}[1]{\txtcode\ \UseCaseVar{#1}}
\newcommand{\coderef}[1]{\txtcode\ \ref{#1}}

\newcommand{\bfhline}{
\setlength{\arrayrulewidth}{1pt}\hline
}

\newcommand{\UseCase}[1][2]{

}

\newcommand{\review}[1]{
  {
    \setlength{\arrayrulewidth}{1pt}
    \centering
    \begin{table}[H]
      \begin{center}
        \begin{tabular}{|p{.9\textwidth}|}
          \rowcolor[gray]{.8}
          \hline
          \textbf{\txtreview:}\\
          \rowcolor[gray]{.8}
          \parbox{0.05\textwidth}{\ } \parbox{0.80\textwidth}{\footnotesize #1} \\
          \hline
        \end{tabular}
      \end{center}
    \end{table}
  }
}

\newcommand{\orgtxt}[1]{
  {
    \setlength{\arrayrulewidth}{1pt}
    \centering
    \begin{table}[H]
      \begin{center}
        \begin{tabular}{|p{.9\textwidth}|}
          \rowcolor[gray]{.8}
          \hline
          \textbf{\txtoriginaltext:}\\
          \rowcolor[gray]{.8}
          \parbox{0.05\textwidth}{\ } \parbox{0.80\textwidth}{\footnotesize #1} \\
          \hline
        \end{tabular}
      \end{center}
    \end{table}
  }
}

\newcommand{\correction}[1]{
  {
    \setlength{\arrayrulewidth}{1pt}
    \centering
    \begin{table}[H]
      \begin{center}
        \begin{tabular}{|p{.9\textwidth}|}
          \rowcolor[gray]{.8}
          \hline
          \textbf{\txtcorrect:}\\
          \rowcolor[gray]{.8}
          \parbox{0.05\textwidth}{\ } \parbox{0.80\textwidth}{\footnotesize #1} \\
          \hline
        \end{tabular}
      \end{center}
    \end{table}
  }
}

\newcommand{\code}[1]{
  {
    \setlength{\arrayrulewidth}{1pt}
    \begin{tabular}{|l|}
      \rowcolor[gray]{.8}
      \hline
      {\tt \textbf{CODE:}}\\
      \rowcolor[gray]{.8}
      \parbox{0.05\textwidth}{\ } \parbox{0.90\textwidth}{{\footnotesize\tt #1\\}} \\
      \hline
    \end{tabular}
  }
}

\newcommand{\consoleout}[1]{
  {
    \setlength{\arrayrulewidth}{1pt}
    \begin{tabular}{|l|}
      \rowcolor[gray]{.8}
      \hline
      {\tt \textbf{Console Output:}}\\
      \rowcolor[gray]{.8}
      \parbox{0.05\textwidth}{\ } \parbox{0.90\textwidth}{{\footnotesize\tt #1\\}} \\
      \hline
    \end{tabular}
  }
}

\newcommand{\java}[1]{
  {
    \definecolor{purple}{rgb}{.3,0,.3}

    \newcommand{\var}{{\color{purple} var}}
    \newcommand{\jpublic}{{\color{purple} \bf public}}
    \newcommand{\jsuper}{{\color{purple} \bf super}}
    \newcommand{\jthrows}{{\color{purple} \bf throws}}
    \newcommand{\jint}{{\bf int}}
    \newcommand{\jthis}{{\color{purple} \bf this}}

    %\newcommand{\jindent}[1]{\parbox{0.05\textwidth}{\ }\parbox{0.8\textwidth}{#1}}


    \setlength{\arrayrulewidth}{1pt}
    \ \linebreak
    \begin{tabular}{|p{0.05\textwidth}p{0.85\textwidth}|}
      \rowcolor[gray]{.8}
      \hline
      \multicolumn{2}{|>{\columncolor[gray]{.8}}l|}{\textbf{Java:}}\\
      \rowcolor[gray]{.8}
      & \parbox{.8\textwidth}{{\footnotesize\tt #1}}  \\
      \hline
    \end{tabular}
    \ \linebreak
  }
}



\makeatletter
% gemmer data i \mydata@<#1>=<#2>
\newcommand\DefineRelation[2]{%
  \@ifdefinable{mydata@#1}{%
    \@namedef{mydata@#1}{#2}}}
\newcommand\UseCaseVar[1]{%
  \@ifundefined{mydata@#1}{%
    \PackageError{mydata}{No data related to '#1'}{}%
  }{%
    \@nameuse{mydata@#1}%
  }%
%\newcommand\CodeBlockVar[1]{%
%  \@ifundefined{mydata@#1}{%
%    \PackageError{mydata}{No data related to '#1'}{}%
%  }{%
%    \@nameuse{mydata@#1}%
%  }%
}
\makeatother 